<template>
    <!-- 修改资料 -->

    <div>
        <el-form label-width="85px" :model="form" label-position="right" ref="formRef" :rules="formRules" disabled class="borderNone">
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="任务名称" prop="jobName">
                        <el-input v-model="form.jobName"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="小组名称" prop="jobGroup">
                        <el-input v-model="form.jobGroup"></el-input>
                    </el-form-item></el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="cron表达式" prop="cronExpression">
                        <el-input v-model="form.cronExpression"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">

                    <el-form-item label="服务名称">
                        <el-input v-model="form.springId"></el-input>
                    </el-form-item></el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="方法名">
                        <el-input v-model="form.methodName"></el-input>
                    </el-form-item></el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="显示顺序" prop="itemIndex">
                        <el-input-number v-model="form.itemIndex" :min="0" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="是否有状态" prop="isConcurrent">
                        <el-switch v-model="form.isConcurrent" size="large" inline-prompt :active-icon="Check"
                            :inactive-icon="Close" active-value="1" inactive-value="0" />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="启动后运行" prop="startupAfterRun">
                        <el-switch v-model="form.startupAfterRun" size="large" inline-prompt :active-icon="Check"
                            :inactive-icon="Close" active-value="1" inactive-value="0" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="保存日志" prop="saveTaskLog">
                        <el-switch v-model="form.saveTaskLog" size="large" inline-prompt :active-icon="Check"
                            :inactive-icon="Close" active-value="1" inactive-value="0" />
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="输出控制台" prop="printConsole">
                        <el-switch v-model="form.printConsole" size="large" inline-prompt :active-icon="Check"
                            :inactive-icon="Close" active-value="1" inactive-value="0" />
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="备注" prop="remark">
                        <el-input v-model="form.remark"></el-input>
                    </el-form-item>

                </el-col>
            </el-row>
        </el-form>
                <div class="button-position">
                    <el-button @click="updateVisible" type="primary" style="margin-left: 250px;">退 出</el-button>
                </div>
    </div>
</template>

<script setup>
import { reactive, ref, getCurrentInstance, watch, onMounted, nextTick } from 'vue';
import { ElNotification } from 'element-plus';
import { FullScreen, CopyDocument, Check, Close } from '@element-plus/icons-vue'
import Api from '@/api/model/system'
const emit = defineEmits(['updatetable'])

const props = defineProps({
    paramsData: {
        type: Object,
        defalut: {}
    }
})
onMounted(() => {
    getData()
})

// 添加用户数据的对象
const form = ref({
});

const formRef = ref()
const formRules = reactive({
})

const updateVisible = () => {
    emit('updatetable')
}

const getData = async () => {
    let res = await Api.quartz.detail.post(props.paramsData);
    if (res.code == 200) {
        form.value = res.data;
    } else {
        form.value = '';
    }
}









</script>

<style lang="scss" scoped>
.borderNone {
    :deep(.el-input__wrapper) {
        box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
        cursor: default;
        background-color: transparent; //背景颜色透明
        border-bottom: 1px solid #999;
        border-radius: 0;

        .el-input__inner {
            cursor: default !important;
        }
    }
}
</style>

